/***********************************************************************************/
/* Code license:  GNU General Public License v3                                    */
/* Main page:     https://code.google.com/p/library-cross-platform/                */
/* Issue tracker: https://code.google.com/p/library-cross-platform/issues/list     */
/***********************************************************************************/

#ifndef _PARSER_STATE_HANDLER_10_JUN_2011_
#define _PARSER_STATE_HANDLER_10_JUN_2011_

#include "types.h"

class parserstatehandler;
typedef bool (parserstatehandler::*pFunctionPntr)(void);

class parserstatehandler
{
  public:
   parserstatehandler(){};
   virtual ~parserstatehandler(){};

   /* return the function pointer for the state
    */
   virtual pFunctionPntr statehandler(int state) = 0;

protected:
    void setNextState(int s) { next_state = s;};
    int  getNextState() {return next_state;};
protected:
    int next_state;
};

#endif
